import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      // path+query
      // path: '/detail',
      // name: 'detail',
      // component: () => import('../views/ArticleDetail.vue'),

      // name+params
      path: '/detail/:id?',
      name: 'detail',
      component: () => import('../views/ArticleDetail.vue'),
    },
  ],
})

export default router
